package org.boulderfoodrescue.webapp.shared;

import java.io.Serializable;

public class FoodType implements Serializable{
	private static final long serialVersionUID = 3054268282200846979L;
	public enum Type{Produce, PreppedFood, BakedGoods};
	private Type type;
	public FoodType(int type)
	{
		switch(type)
		{
		case 0: this.type = Type.Produce;break;
		case 1: this.type = Type.PreppedFood; break;
		case 2: this.type = Type.BakedGoods; break;
		}
	}
	public FoodType(Type type)
	{
		this.type = type;
	}
	public String toString()
	{
		switch(type)
		{
		case Produce: return "Produce";
		case PreppedFood: return "Prepped Food";
		case BakedGoods: return "BakedGoods";
		default: return "Unknown";
		}
	}
	public int intValue()
	{
		switch(type)
		{
		case Produce: return 0;
		case PreppedFood: return 1;
		case BakedGoods: return 2;
		default: return -1;
		}
	}
}
